import { _decorator, Component, Node } from 'cc';
import { enemy } from './enemy';
const { ccclass, property } = _decorator;

@ccclass('bgMove')
export class bgMove extends Component {
    @property(Node)
    hero: Node
    start() {

    }
    move(x) {
        const bx = -x
        const nx = bx - this.node.position.x
        if (nx > 600) {

        }
        this.node.setPosition(bx, this.node.position.y)
    }

    update(deltaTime: number) {
    }
}


